package com.manager;

import com.manager.model.FirstPageState;
import com.manager.model.SensitiveWord;
import net.sf.json.JSONObject;
import org.apache.commons.io.FileUtils;

import java.io.File;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Test {

    public static void main(String[] args) throws Exception {
     /*  *//* SensitiveWord sensitiveWord = new SensitiveWord();
        sensitiveWord.setWord("hello");
        System.out.println(JSONObject.fromObject(sensitiveWord).toString().length());*//*
        String filePath = "C:\\Users\\liuhj\\Desktop\\拟态\\状态数据\\stats_1754467453.json";
        String jsonStr = FileUtils.readFileToString(new File(filePath));
        JSONObject jsonObject = JSONObject.fromObject(jsonStr);
       *//* FirstPageState firstPageState = (FirstPageState) JSONObject.toBean(jsonObject, FirstPageState.class);
        System.out.println("===============");*//*
        FirstPageState  firstPageState = new FirstPageState();
        jsonObject.keys().forEachRemaining(key -> {
           try {
               Field field  = FirstPageState.class.getDeclaredField(String.valueOf(key));
               field.setAccessible(true);
               field.set(firstPageState,jsonObject.getString(String.valueOf(key)));
           }catch (Exception e){
               e.printStackTrace();
           }
        });
        System.out.println("----------------------");*/
        //1757985055000
        //1758250419082
        System.out.println(System.currentTimeMillis());

        long currentTimeMillis = System.currentTimeMillis();
        SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
        String formattedDate = sdf.format(new Date(1757985055000l));
        System.out.println(formattedDate);
    }
}
